<template>
  <div class="top-header">
    <router-link :to="{ name: 'Console' }">
      <img :src="mini ? logoMini : logo" class="logo" alt="logo">
      <h1 v-if="showTitle && title">
        {{ title }}
      </h1>
    </router-link>
  </div>
</template>

<script>
import logo from '@/assets/logo-white.png'
import logoMini from '@/assets/logo-mini.png'

export default {
  name: 'Logo',
  props: {
    title: {
      type: String,
      default: '',
      required: false
    },
    showTitle: {
      type: Boolean,
      default: true,
      required: false
    },
    mini: Boolean
  },
  data() {
    return {
      logo,
      logoMini
    }
  },
  watch: {
    mini(newValue, oldValue) {
      console.log(newValue)
    }
  },
}
</script>
